package DataAccess;

//////////////////////////////////////////////////////////////////////////
// �� �� ��: hy_login_info.cs
// �� �� ��: otyg
// ��������: DateTime.Now();
// ��    ��: ��װ���ݱ�[hy_login_info]��ز���
// ģ���޸�: 
//     2006-11-17  ֧��ChangePage�ؼ���ֻװ�ص�ǰҳ���ݹ���
//     2006-10-28  ����ͨ��DataRowView���쵥��������
//     2006-10-16  ���뼯�ϲ���foreach/Add/Remove�ȹ���,����Transaction����
// ��    Ȩ: ���������  QQ:1775068  
//////////////////////////////////////////////////////////////////////////
/** 
 Data Access Layer Object Of hy_login_info
*/
public class hy_login_info extends DataAccessBase
{
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#region ����ͻ���
	public hy_login_info()
	{
		super();
		_DataRow.setItem("Hy_Id", 0);
		_DataRow.setItem("Hy_Login_Name", "");
		_DataRow.setItem("Hy_Pwd", "");
		_DataRow.setItem("Hy_Zt", "");
		_DataRow.setItem("Hy_Num", 0);
		_DataRow.setItem("Hy_Type", "");
		_DataRow.setItem("Hy_Email", "");
		_DataRow.setItem("Hy_Pwd_Question", "");
		_DataRow.setItem("Hy_Pwd_Answer", "");
		_DataRow.setItem("Hy_Group", "");
		_DataRow.setItem("Hy_Role", "");
		_DataRow.setItem("Hy_Login_Ip", "");
		_DataRow.setItem("Hy_Login_Time", java.time.LocalDateTime.MIN);
		_DataRow.setItem("Hy_Regisret_Time", java.time.LocalDateTime.MIN);
		_DataRow.setItem("Hy_Dail_id", "");
		_DataRow.setItem("tichengbili", "");
	}
	public hy_login_info(DataRow dataRow)
	{
		super(dataRow);
	}
	public hy_login_info(DataRowView dataRowView)
	{
		super(dataRowView);
	}
	@Override
	protected DataRow BuildRow()
	{
		DataTable dt = new DataTable();
		dt.Columns.Add("Hy_Id",Integer.class);
		dt.Columns.Add("Hy_Login_Name",String.class);
		dt.Columns.Add("Hy_Pwd",String.class);
		dt.Columns.Add("Hy_Zt",String.class);
		dt.Columns.Add("Hy_Num",Integer.class);
		dt.Columns.Add("Hy_Type",String.class);
		dt.Columns.Add("Hy_Email",String.class);
		dt.Columns.Add("Hy_Pwd_Question",String.class);
		dt.Columns.Add("Hy_Pwd_Answer",String.class);
		dt.Columns.Add("Hy_Group",String.class);
		dt.Columns.Add("Hy_Role",String.class);
		dt.Columns.Add("Hy_Login_Ip",String.class);
		dt.Columns.Add("Hy_Login_Time",java.time.LocalDateTime.class);
		dt.Columns.Add("Hy_Regisret_Time",java.time.LocalDateTime.class);
		dt.Columns.Add("Hy_Dail_id",String.class);
		dt.Columns.Add("tichengbili",String.class);
		return dt.NewRow();
	}
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#endregion ����ͻ���
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#region ����
	public final DataRow getDataRow()
	{
		return super._DataRow;
	}
	public final int getHy_Id()
	{
		return Integer.parseInt(_DataRow.getItem("Hy_Id").toString());
	}
	public final void setHy_Id(int value)
	{
		_DataRow.setItem("Hy_Id", value);
	}
	public final String getHy_Login_Name()
	{
		return _DataRow.getItem("Hy_Login_Name").toString();
	}
	public final void setHy_Login_Name(String value)
	{
		_DataRow.setItem("Hy_Login_Name", value);
	}
	public final String getHy_Pwd()
	{
		return _DataRow.getItem("Hy_Pwd").toString();
	}
	public final void setHy_Pwd(String value)
	{
		_DataRow.setItem("Hy_Pwd", value);
	}
	public final String getHy_Zt()
	{
		return _DataRow.getItem("Hy_Zt").toString();
	}
	public final void setHy_Zt(String value)
	{
		_DataRow.setItem("Hy_Zt", value);
	}
	public final int getHy_Num()
	{
		return Integer.parseInt(_DataRow.getItem("Hy_Num").toString());
	}
	public final void setHy_Num(int value)
	{
		_DataRow.setItem("Hy_Num", value);
	}
	public final String getHy_Type()
	{
		return _DataRow.getItem("Hy_Type").toString();
	}
	public final void setHy_Type(String value)
	{
		_DataRow.setItem("Hy_Type", value);
	}
	public final String getHy_Email()
	{
		return _DataRow.getItem("Hy_Email").toString();
	}
	public final void setHy_Email(String value)
	{
		_DataRow.setItem("Hy_Email", value);
	}
	public final String getHy_Pwd_Question()
	{
		return _DataRow.getItem("Hy_Pwd_Question").toString();
	}
	public final void setHy_Pwd_Question(String value)
	{
		_DataRow.setItem("Hy_Pwd_Question", value);
	}
	public final String getHy_Pwd_Answer()
	{
		return _DataRow.getItem("Hy_Pwd_Answer").toString();
	}
	public final void setHy_Pwd_Answer(String value)
	{
		_DataRow.setItem("Hy_Pwd_Answer", value);
	}
	public final String getHy_Group()
	{
		return _DataRow.getItem("Hy_Group").toString();
	}
	public final void setHy_Group(String value)
	{
		_DataRow.setItem("Hy_Group", value);
	}
	public final String getHy_Role()
	{
		return _DataRow.getItem("Hy_Role").toString();
	}
	public final void setHy_Role(String value)
	{
		_DataRow.setItem("Hy_Role", value);
	}
	public final String getHy_Login_Ip()
	{
		return _DataRow.getItem("Hy_Login_Ip").toString();
	}
	public final void setHy_Login_Ip(String value)
	{
		_DataRow.setItem("Hy_Login_Ip", value);
	}
	public final java.time.LocalDateTime getHy_Login_Time()
	{
		return java.time.LocalDateTime.parse(_DataRow.getItem("Hy_Login_Time").toString());
	}
	public final void setHy_Login_Time(java.time.LocalDateTime value)
	{
		_DataRow.setItem("Hy_Login_Time", value);
	}
	public final java.time.LocalDateTime getHy_Regisret_Time()
	{
		return java.time.LocalDateTime.parse(_DataRow.getItem("Hy_Regisret_Time").toString());
	}
	public final void setHy_Regisret_Time(java.time.LocalDateTime value)
	{
		_DataRow.setItem("Hy_Regisret_Time", value);
	}
	public final String getHy_Dail_id()
	{
		return _DataRow.getItem("Hy_Dail_id").toString();
	}
	public final void setHy_Dail_id(String value)
	{
		_DataRow.setItem("Hy_Dail_id", value);
	}
	public final String gettichengbili()
	{
		return _DataRow.getItem("tichengbili").toString();
	}
	public final void settichengbili(String value)
	{
		_DataRow.setItem("tichengbili", value);
	}
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#endregion ����
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#region ��������
	protected final boolean DeleteByCondition(String condition)
	{
		String sql = "" + "\r\n" +
"				Delete From hy_login_info" + "\r\n" +
"				WHERE " + condition;
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
//#if(DEBUG)
		super.ExecuteSQL(sql);
//#else
		try
		{
			super.ExecuteSQL(sql);
		}
		catch (java.lang.Exception e)
		{
			return false;
		}
//#endif
		return true;
	}
	public final boolean Delete(int Hy_Num)
	{
		String condition = "Hy_Num=" + String.valueOf(Hy_Num);
		return DeleteByCondition(condition);
	}
	public final boolean Delete()
	{
		String condition = "Hy_Num=" + String.valueOf(getHy_Num());
		return DeleteByCondition(condition);
	}
	public final boolean Insert()
	{
			String sql = "" + "\r\n" +
"				Insert Into hy_login_info (" + "\r\n" +
"					" + "\r\n" +
"					Hy_Login_Name," + "\r\n" +
"					Hy_Pwd," + "\r\n" +
"					Hy_Zt," + "\r\n" +
"		" + "\r\n" +
"			" + "\r\n" +
"					Hy_Email," + "\r\n" +
"					" + "\r\n" +
"					Hy_Dail_id" + "\r\n" +
"\r\n" +
"				) Values (" + "\r\n" +
"					" + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Login_Name()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Pwd()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Zt()) + "," + "\r\n" +
"				" + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Email()) + "," + "\r\n" +
"				" + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Dail_id()) + "\r\n" +
"\r\n" +
"				)";
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
//#if(DEBUG)
		super.ExecuteSQL(sql);
//#else
		try
		{
			super.ExecuteSQL(sql);
		}
		catch (java.lang.Exception e)
		{
			return false;
		}
//#endif
		return true;
	}
	protected final boolean SelectByCondition(String condition)
	{
		String sql = "" + "\r\n" +
"				Select" + "\r\n" +
"					Hy_Id," + "\r\n" +
"					Hy_Login_Name," + "\r\n" +
"					Hy_Pwd," + "\r\n" +
"					Hy_Zt," + "\r\n" +
"					Hy_Num," + "\r\n" +
"					Hy_Type," + "\r\n" +
"					Hy_Email," + "\r\n" +
"					Hy_Pwd_Question," + "\r\n" +
"					Hy_Pwd_Answer," + "\r\n" +
"					Hy_Group," + "\r\n" +
"					Hy_Role," + "\r\n" +
"					Hy_Login_Ip," + "\r\n" +
"					Hy_Login_Time," + "\r\n" +
"					Hy_Regisret_Time," + "\r\n" +
"					Hy_Dail_id," + "\r\n" +
"					tichengbili" + "\r\n" +
"				  From hy_login_info" + "\r\n" +
"				 Where " + condition + "\r\n" +
"			";
		DataTable dt;
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
//#if(DEBUG)
		dt = super.GetDataTable(sql);
//#else
		try
		{
			dt = super.GetDataTable(sql);
		}
		catch (java.lang.Exception e)
		{
			return false;
		}
//#endif
		try
		{
			_DataRow = dt.Rows[0];
		}
		catch (java.lang.Exception e2)
		{
			return false;
		}
		return true;
	}
	public final boolean SelectByPk(int Hy_Num)
	{
		String condition = "1=1" + "\r\n" +
"				   And Hy_Num=" + String.valueOf(Hy_Num) + "\r\n" +
"			";
		return SelectByCondition(condition);
	}
	public final boolean Update()
	{
		String sql = "" + "\r\n" +
"				Update hy_login_info SET" + "\r\n" +
"				" + "\r\n" +
"					Hy_Login_Name=" + Helper.ToSQLParamStr(getHy_Login_Name()) + "," + "\r\n" +
"					Hy_Pwd=" + Helper.ToSQLParamStr(getHy_Pwd()) + "," + "\r\n" +
"					Hy_Zt=" + Helper.ToSQLParamStr(getHy_Zt()) + "," + "\r\n" +
"					Hy_Type=" + Helper.ToSQLParamStr(getHy_Type()) + "," + "\r\n" +
"					Hy_Email=" + Helper.ToSQLParamStr(getHy_Email()) + "," + "\r\n" +
"					Hy_Pwd_Question=" + Helper.ToSQLParamStr(getHy_Pwd_Question()) + "," + "\r\n" +
"					Hy_Pwd_Answer=" + Helper.ToSQLParamStr(getHy_Pwd_Answer()) + "," + "\r\n" +
"					Hy_Group=" + Helper.ToSQLParamStr(getHy_Group()) + "," + "\r\n" +
"					Hy_Role=" + Helper.ToSQLParamStr(getHy_Role()) + "," + "\r\n" +
"					Hy_Login_Ip=" + Helper.ToSQLParamStr(getHy_Login_Ip()) + "," + "\r\n" +
"					Hy_Login_Time=" + Helper.ToSQLParamStr(getHy_Login_Time().toString()) + "," + "\r\n" +
"					Hy_Regisret_Time=" + Helper.ToSQLParamStr(getHy_Regisret_Time().toString()) + "," + "\r\n" +
"					Hy_Dail_id=" + Helper.ToSQLParamStr(getHy_Dail_id()) + "," + "\r\n" +
"					tichengbili=" + Helper.ToSQLParamStr(gettichengbili()) + "\r\n" +
"				Where 1=1" + "\r\n" +
" 				  And Hy_Num= " + String.valueOf(getHy_Num()) + "\r\n" +
"				";
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
//#if(DEBUG)
		return (super.ExecuteSQL(sql) == 1);
//#else
		try
		{
			return (super.ExecuteSQL(sql) == 1);
		}
		catch (java.lang.Exception e)
		{
			return false;
		}
//#endif
	}

//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#endregion ��������
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#region ���淽��
	public final boolean SelectByName(String Hy_Name)
	{
		String condition = "1=1" + "\r\n" +
"				   And Hy_Login_Name=" + Helper.ToSQLParamStr(Hy_Name) + "\r\n" +
"			";
		return SelectByCondition(condition);
	}
	public final boolean SelectByPkAndName(int Hy_Num, String Name)
	{
		String condition = "1=1" + "\r\n" +
"				   And Hy_Num=" + String.valueOf(Hy_Num) + "  " + "\r\n" +
"					And Hy_Login_Name=" + Helper.ToSQLParamStr(Name) + "\r\n" +
"			";
		return SelectByCondition(condition);
	}
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#endregion ���淽��
}